import {createRouter,createWebHistory} from 'vue-router'
import Home from '@/views/home/index.vue'
import Bar from '@/views/navbar/index.vue'
import AiBird from '@/views/aibird/index.vue'
import Analysis from '@/views/analyzetext/index.vue'
import Camera from '@/views/camera/index.vue'
import Device from '@/views/device/index.vue'
import Login from '@/views/login/index.vue'
import Manage from '@/views/manage/index.vue'
import Map from '@/views/map/index.vue'
import Voice from '@/views/voice/index.vue'
import Warning from '@/views/warning/index.vue'



const router = createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:'/',
            name:'bar',
            redirect:'/home',
            component:Bar,
            children:[
                {
                    path:'/home',
                    name:'home',
                    component:Home
                },
                {
                    path:'/aibird',
                    name:'aibird',
                    component:AiBird
                },
                {
                    path:'/analyzetext',
                    name:'analyzetext',
                    component:Analysis
                },
                {
                    path:'/camera',
                    name:'camera',
                    component:Camera
                },
                {
                    path:'/device',
                    name:'device',
                    component:Device
                },
                {
                    path:'/login',
                    name:'login',
                    component:Login
                },
                {
                    path:'/manage',
                    name:'manage',
                    component:Manage
                },
                {
                    path:'/map',
                    name:'map',
                    component:Map
                },
                {
                    path:'/voice',
                    name:'voice',
                    component:Voice
                },
                {
                    path:'/warning',
                    name:'warning',
                    component:Warning
                }
            ]
        }
    ]
})

export default router